package com.tx.collections.list;

import java.util.ArrayList;
import java.util.LinkedList;

/**
 *
 */
public class LinkedListDemo {
    public static void main(String[] args) {
        LinkedList<Object> list = new LinkedList<>();
        //1、添加操作
        //1.1  list
        /*list.add("hello");
        list.add("world");

        list.add(1,"hi");

        list.addAll(new ArrayList<>());

        list.addFirst("111");*/

        //2、查询操作
        list.add("hello");
        list.add("world");
        System.out.println(list.get(1));
        System.out.println(list.indexOf("hello"));

        list.remove(1);
    }
}